]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: don't change grid page on adaptToSize
authorDaniel García Moreno <danigm@endlessos.org>
Thu, 12 Nov 2020 09:38:17 +0000 (10:38 +0100)
committerDaniel García Moreno <danigm@endlessos.org>
Thu, 12 Nov 2020 15:47:11 +0000 (16:47 +0100)
If the adapt to size occurs after the grid page has been changed the
page is set to zero. This patch just keep the current page with the same
value that it has before.

Fix https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3388

js/ui/appDisplay.js

index 8e10de2d8f3d0f3dd8e9060dbf8117ad43b2baf1..6c7d1f4570390a37a034b91e69435844b24930b8 100644 (file)
@@ -844,9 +844,9 @@ var BaseAppView = GObject.registerClass({
             this._pageIndicators.nPages !== this._grid.nPages) {
             Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
                 this._adjustment.value = 0;
-                this._grid.currentPage = 0;
+                this.goToPage(this._grid.currentPage);
                 this._pageIndicators.setNPages(this._grid.nPages);
-                this._pageIndicators.setCurrentPosition(0);
+                this._pageIndicators.setCurrentPosition(this._grid.currentPage);
                 return GLib.SOURCE_REMOVE;
             });
         }